---
layout: api
title: "v2.1.1 JavaScript Library: L.mapbox.marker.icon(properties)"
categories: api
version: v2.1.1
permalink: /api/v2.1.1/l-mapbox-marker-icon/
---
<h2 id="section-l-mapbox-marker-icon">L.mapbox.marker.icon(properties)</h2>
<p>A core icon generator used in <code><a href="/mapbox.js/api/v2.1.1/l-mapbox-marker-style">L.mapbox.marker.style</a></code></p>
<table>
<thead>
<tr>
<th>Options</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>feature</td>
<td>object</td>
<td>A GeoJSON feature object</td>
</tr>
</tbody>
</table>
<p><em>Returns</em>:</p>
<p>A <code><a href="/mapbox.js/api/v2.1.1/l-icon">L.Icon</a></code> object with custom settings for <code>iconUrl</code>, <code>iconSize</code>, <code>iconAnchor</code>,
and <code>popupAnchor</code>.</p>
<p><a href="https://www.mapbox.com/mapbox.js/example/v1.0.0/l-mapbox-marker/">A working example of L.mapbox.marker.icon in use</a></p>
